﻿@model IEnumerable<BaseballGame.Models.Team>

@{
    ViewBag.Title = "MyTeam";
}

<h2>MyTeam</h2>
<table>
  
@foreach (var item in Model) {
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.teamName)
        </th>
        <td>
            @Html.DisplayFor(modelItem => item.teamName)
        </td>
    </tr>

    <tr>
        <th>
             @Html.DisplayNameFor(model => model.PitcherId)
        </th>
        <td>
            @Html.ActionLink(item.Pitcher.player_name, "PlayerDetails", new { id=item.PitcherId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.FirstBaseId)
        </th>
        <td>
            @Html.ActionLink(item.FirstBase.player_name, "PlayerDetails", new { id=item.FirstBaseId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.SecondBaseId)
        </th>
        <td>
            @Html.ActionLink(item.SecondBase.player_name, "PlayerDetails", new { id=item.SecondBaseId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ShortStopId)
        </th>
        <td>
            @Html.ActionLink(item.ShortStop.player_name, "PlayerDetails", new { id=item.ShortStopId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ThirdBaseId)
        </th>
        <td>
            @Html.ActionLink(item.ThirdBase.player_name, "PlayerDetails", new { id=item.ThirdBaseId }) 
        </td>
    </tr>
         <th>
            @Html.DisplayNameFor(model => model.CatcherId)
        </th>
        <td>
            @Html.ActionLink(item.Catcher.player_name, "PlayerDetails", new { id=item.CatcherId }) 
        </td>
    <tr>
         <th>
            @Html.DisplayNameFor(model => model.LeftFieldId)
        </th>
        <td>
            @Html.ActionLink(item.LeftField.player_name, "PlayerDetails", new { id=item.LeftFieldId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.RightfieldId)
        </th>
        <td>
           @Html.ActionLink(item.Rightfield.player_name, "PlayerDetails", new { id=item.RightfieldId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CenterFieldId)
        </th>
        <td>
           @Html.ActionLink(item.CenterField.player_name, "PlayerDetails", new { id=item.CenterFieldId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_FirstBaseId)
        </th>
        <td>
            @Html.ActionLink(item.B_FirstBase.player_name, "PlayerDetails", new { id=item.B_FirstBaseId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_SecondBaseId)
        </th>
        <td>
            @Html.ActionLink(item.B_SecondBase.player_name, "PlayerDetails", new { id=item.B_SecondBaseId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_ShortStopId)
        </th>
        <td>
            @Html.ActionLink(item.B_ShortStop.player_name, "PlayerDetails", new { id=item.B_ShortStopId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_ThirdBaseId)
        </th>
        <td>
           @Html.ActionLink(item.B_ThirdBase.player_name, "PlayerDetails", new { id=item.B_ThirdBaseId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_CatcherId)
        </th>
        <td>
            @Html.ActionLink(item.B_Catcher.player_name, "PlayerDetails", new { id=item.B_CatcherId }) 
        </td>
    </tr>
    <tr>
         <th>
            @Html.DisplayNameFor(model => model.B_LeftFieldId)
        </th>
        <td>
            @Html.ActionLink(item.B_LeftField.player_name, "PlayerDetails", new { id=item.B_LeftFieldId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_MidfieldId)
        </th>
        <td>
            @Html.ActionLink(item.B_Midfield.player_name, "PlayerDetails", new { id=item.B_MidfieldId }) 
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.B_CenterFieldId)
        </th>
        <td>
            @Html.ActionLink(item.B_CenterField.player_name, "PlayerDetails", new { id=item.B_CenterFieldId}) 
        </td>
    </tr>
    <tr>
         <th>
            @Html.DisplayNameFor(model => model.BullPen1Id)
        </th>
        <td>
           @Html.ActionLink(item.BullPen1.player_name, "PlayerDetails", new { id=item.BullPen2Id })  
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.BullPen2Id)
        </th>
        <td>
           @Html.ActionLink(item.BullPen2.player_name, "PlayerDetails", new { id=item.BullPen2Id })  
        </td>
    </tr>
    <tr>
         <th>
            @Html.DisplayNameFor(model => model.BullPen3Id)
        </th>
        <td>
           @Html.ActionLink(item.BullPen3.player_name, "PlayerDetails", new { id=item.BullPen3Id })  
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.BullPen4Id)
        </th>
        <td>
            @Html.ActionLink(item.BullPen4.player_name, "PlayerDetails", new { id=item.BullPen4Id })  
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CloserId)
        </th>
        <td>
           @Html.ActionLink(item.Closer.player_name, "PlayerDetails", new { id=item.CloserId })  
        </td>
    </tr>
    <tr>
        <td>
            @Html.ActionLink("Edid Team Line Up", "Edit", new { id=item.Id }) 
          @{  //@Html.ActionLink("Edit", "Edit", new { id=item.Id }) |} 
           //@Html.ActionLink("Delete", "Delete", new { id=item.Id }) } 
           }
        </td>
    </tr>
}

</table>
